﻿package cn.antscript.airCMS.data 
{
	/**
	 * ...
	 * @author 
	 */
	public class PageData implements IGroupBtn
	{
		public var label:String;
		public var id:String;
		public var textContainer:Vector.<TextsData>;
		public var imgContainer:Vector.<ImgsData>;
		public var musicContainer:Vector.<MusicsData>;
		public var videoContainer:Vector.<VideosData>;
		public var fileContainer:Vector.<FilesData>;
		
		public function PageData(xml:XML) 
		{
			id=String(xml.@id);
			label = String(xml.@label);
			
			var i:int;			
			
			textContainer = new Vector.<TextsData>();
			for (i = 0; i < xml.textContainer.texts.length() ; i++) 
			{
				textContainer.push(new TextsData(XML(xml.textContainer.texts[i])));
			}
			
			imgContainer = new Vector.<ImgsData>();
			for (i = 0; i < xml.imgContainer.imgs.length() ; i++) 
			{
				imgContainer.push(new ImgsData(XML(xml.imgContainer.imgs[i])));
			}
			
			musicContainer = new Vector.<MusicsData>();
			for (i = 0; i < xml.musicContainer.musics.length() ; i++) 
			{
				musicContainer.push(new MusicsData(XML(xml.musicContainer.musics[i])));
			}
			
			videoContainer = new Vector.<VideosData>();
			for (i = 0; i < xml.videoContainer.videos.length() ; i++) 
			{
				videoContainer.push(new VideosData(XML(xml.videoContainer.videos[i])));
			}
			
			fileContainer = new Vector.<FilesData>();
			for (i = 0; i < xml.fileContainer.files.length() ; i++) 
			{
				fileContainer.push(new FilesData(XML(xml.fileContainer.files[i])));
			}
		}
		
	}

}